web3.js web3.eth.getAccounts
code:getAccounts.js
web3.eth.getAccounts(callback)
ノードが管理するアカウントのリストを返します。
戻り値
Array を返す Promise
ノードによって管理されているアドレスの配列
サンプル
code:example.js
web3.eth.getAccounts()
.then(console.log);
"0x11f4d0A3c12e86B4b5F39B213F7E19D048276DAe", "0xDCc6960376d6C6dEa93647383FfB245CfCed97Cf"
原文
http://web3js.readthedocs.io/en/1.0/web3-eth.html#getaccounts
#web3.js #web3.js@1.0
web3.js 日本語 API リファレンス